class Siteadmin::WorkplacesController < ApplicationController
	before_filter :require_admin
	load_and_authorize_resource :through => :profile

	active_scaffold :workplaces do |config|
		config.create.columns.exclude :profile
		config.update.columns.exclude :profile

		config.columns[:name].label = "Company Name"
		config.columns[:startyear].label = "Start Year"
		config.columns[:endyear].label = "End Year"

		config.list.columns = [:name, :position, :startyear, :endyear]
		config.create.columns = [:name, :position, :telephone, :startyear, :endyear]
		config.update.columns = [:name, :position, :telephone, :startyear, :endyear]
	end
end
